package com.txts.road.admin.raceSys.service.impl;

import com.txts.road.admin.raceSys.domain.RaceSys;
import com.txts.road.admin.raceSys.mapper.RaceSysMapper;
import com.txts.road.admin.raceSys.service.IRaceSysService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 赛段信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-21
 */
@Service
public class RaceSysServiceImpl implements IRaceSysService
{
    @Resource
    private RaceSysMapper raceSysMapper;

    /**
     * 查询赛段信息
     *
     * @param sectionName 赛段信息主键
     * @return 赛段信息
     */
    @Override
    public RaceSys selectRaceSysBySectionName(String sectionName)
    {
        return raceSysMapper.selectRaceSysBySectionName(sectionName);
    }

    /**
     * 查询赛段信息列表
     *
     * @param raceSys 赛段信息
     * @return 赛段信息
     */
    @Override
    public List<RaceSys> selectRaceSysList(RaceSys raceSys)
    {
        return raceSysMapper.selectRaceSysList(raceSys);
    }

    /**
     * 新增赛段信息
     *
     * @param raceSys 赛段信息
     * @return 结果
     */
    @Override
    public int insertRaceSys(RaceSys raceSys)
    {
        return raceSysMapper.insertRaceSys(raceSys);
    }

    /**
     * 修改赛段信息
     *
     * @param raceSys 赛段信息
     * @return 结果
     */
    @Override
    public int updateRaceSys(RaceSys raceSys)
    {
        return raceSysMapper.updateRaceSys(raceSys);
    }

    /**
     * 批量删除赛段信息
     *
     * @param sectionNames 需要删除的赛段信息主键
     * @return 结果
     */
    @Override
    public int deleteRaceSysBySectionNames(String[] sectionNames)
    {
        return raceSysMapper.deleteRaceSysBySectionNames(sectionNames);
    }

    /**
     * 删除赛段信息信息
     *
     * @param sectionName 赛段信息主键
     * @return 结果
     */
    @Override
    public int deleteRaceSysBySectionName(String sectionName)
    {
        return raceSysMapper.deleteRaceSysBySectionName(sectionName);
    }


    @Override
    public List<String> selectAllSaishi() {
        return raceSysMapper.selectAllSaishi();
    }
}
